@extends('admin.master')
        
@section('content')
<h1>Categor&iacute;as <small>Objetos</small></h1>
            
            {{-- will be used to show any messages --}}
            @if (Session::has('message'))
            <div class="alert alert-info">{{ Session::get('message') }}</div>
            @endif
            
            <div class="table-responsive">
            <table id="sort" class="table table-hover table-bordered table-condensed">
                <thead>
                    <tr>
                        <th>Nombre</th>
                        <th class="text-center">Editar</th>
                        <th class="text-center">Borrar</th>
                    </tr>
                </thead>
                <tbody>
                    @foreach($tagobjs as $key => $value)
                    <tr id="items_{{ $value->id }}">
                        <td>{{{ $value->nombre }}}</td>
                        <td class="text-center">
                            <!-- edit this objeto (uses the edit method found at GET /objetos/{id}/edit -->
                            <a class="btn btn-xs btn-info" href="{{ URL::to('admin/tagobjs/' . $value->id . '/edit') }}"><span class="glyphicon glyphicon-pencil"></span></a>
                        </td>
                        <td class="text-center">
                            {{-- delete the objeto (uses the destroy method DESTROY admin/objetos/{id} --}}
                            {{-- The DELETE HTTP verb is used when accessing the nerds.destroy route. 
                                Since you can’t just create a button or form with the method DELETE, 
                                we will have to spoof it by creating a hidden input field in our delete form. --}}
                                
                            {{ Form::open(array('url' => 'admin/tagobjs/' . $value->id)) }}
                            {{ Form::hidden('_method', 'DELETE') }}
                            {{ Form::button('<span class="ladda-label"><span class="glyphicon glyphicon-trash"></span></span>', ['type' => 'submit', 'class' => 'ladda-button delete-button btn btn-xs btn-danger', 'data-style'=>'zoom-in']) }}
                            {{ Form::close() }}
                        </td>

                    </tr>
                    @endforeach
                </tbody>
            </table>
        </div>
@stop
@section('js-footer')
@parent
{{ HTML::script('assets/admin/js/scripts.js') }}
@stop
